IUTimePString
long rawSecs ; seconds since 1/1/1904 (ala GetDateTime) Boolean wantSecs ; 0=truncate seconds, 1=include seconds Str255 resultStr ; address of buffer to receive resulting p- string IUTimePString converts a binary date/time value into a string of text describing the time of day, exactly as described in IUTimeString except that you can specify a custom data structure to override normal output formatting.
rawSecs is a long integer; the number of seconds since Midnight, 1/1/1904.
You can use any date/time value obtained from a catalog information
wantSecs specifies whether to include the seconds (as well as the hour and
minute) in the output. It is one of:
FALSE Discard seconds: 1:05 AM TRUE Include seconds: 1:05:09 AM resultStr is the address of a buffer. Upon return, it will contain the text of
the time as a pascal-style length-prefixed string in the layout
identified by flags in 'INTL' resource 0.
intlHndl is a Handle leading to either a 32-byte Intl0Rec structure. This is normally a handle obtained via IUGetIntl(0) with selected fields modified.
format the output of time and date strings.
Normal usage is to call IUGetIntl(0), modify one or more fields of the Example
#include <Packages.h>
/* outputs time in 24-hr format with leading 0s in all fields; e.g.: 13:04:02
*/
long nowNum;
Intl0Hndl i0h; [TOKEN:12074] handle to an Intl0Rec */ i0h = (Intl0Hndl)IUGetIntl( 0 ); /* get current settings */ (*i0h)->timeCycle=0; /* 24-hr format */
(*i0h)->timeFmt |= secLeadingZ | minLeadingZ | hrLeadingZ;